package com.kaifamiao.demo.d0801.factory;

public abstract class Human {

    abstract void printColor();


    abstract void talk();
}
// 两种选择： 1. 实现/重写 抽象方法  2. 自己声明为抽象类
class BlackHuman extends Human {


    @Override
    void printColor() {
        System.out.println(" black ");
    }

    @Override
    void talk() {
        System.out.println(" 人人平等 ");
    }
}

class WhiteHuman extends Human {

    @Override
    void printColor() {
        System.out.println(" 白人 ");
    }

    @Override
    void talk() {
        System.out.println(" 白人 ");
    }
}


abstract class YellowHuman extends Human{}


class Chinese extends YellowHuman {

    @Override
    void printColor() {
        System.out.println(" 黄皮肤 ");
    }

    @Override
    void talk() {
        System.out.println(" NB ");
    }
}


class GreenHuman extends Human {

    @Override
    void printColor() {
        System.out.println(" 绿绿绿 ");
    }

    @Override
    void talk() {
        System.out.println(" 浩克 ");
    }
}